home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
conv
/
Wasp202b.lha
/
wasp
/
src
/
scrsz.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-27
|
861b
|
39 lines
/* wasp - Copyright 1991 by Steven Reiz
* see COPYING and wasp.c for further info,
* scrsz.c, 27/12/90, 8/7/91 - 9/7/91, 8/12/91
*/
#ifndef AMIGA
#error AMIGA should be defined!
#endif
#ifdef AZTEC_C
#include <functions.h>
#endif
#ifdef LATTICE
#include <proto/exec.h>
#include <proto/dos.h>
#endif
#include <graphics/view.h>
#include <intuition/intuitionbase.h>
struct IntuitionBase *IntuitionBase;
extern short scrw, scrh; /* also defined in wasp.h */
void
get_scr_size(void)
{
struct ViewPort *vp;
if (IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library", 0L)) {
vp=IntuitionBase->ViewLord.ViewPort;
scrw=vp->DWidth;
scrh=vp->DHeight;
if (vp->Modes & HIRES)
scrw/=2;
if (vp->Modes & LACE)
scrh/=2;
CloseLibrary((struct Library *)IntuitionBase);
}
}